/* eslint-disable import/prefer-default-export */
/**
 * ZPQD 招聘渠道 不同国家对应的字典key
 * postTypeRemark 职位类型的字典 dictCode
 * recruitReportRemark 职位列表字典
 */
const countryMap = [
    {
        companyId: 100,
        ZPQD: 'SingaporeRecruitWay',
        country: 'singapore',
        postTypeRemark: 'GroupRecruitPostType',
        recruitReportRemark: 'GroupPost',
        offerPostType: 'GroupOfferPostType'
    },
    {
        companyId: 101,
        ZPQD: 'ChinaRecruitWay',
        country: 'china',
        postTypeRemark: 'ChinaRecruitPostType',
        recruitReportRemark: 'ChinaPost ',
        offerPostType: 'ChinaOfferPostType'
    },
    {
        companyId: 102,
        ZPQD: 'SingaporeRecruitWay',
        country: 'singapore',
        postTypeRemark: 'SingaporeRecruitPostType',
        recruitReportRemark: 'SingaporePost',
        offerPostType: 'SingaporeOfferPostType'
    }
];
/** 根据字典判断不同公司 */
const findCountry = companyId => countryMap.find(v => Number(companyId) === v.companyId) || {};

/** 招聘进度状态色 */
const recruitColor = [
    {
        dictValue: 'recruit_cancel',
        dictName: '招聘取消',
        color: 'red'
    },
    {
        dictValue: 'recruit_finish',
        dictName: '招聘完成',
        color: 'green'
    },
    {
        dictValue: 'recruit_hiring',
        dictName: '招聘中',
        color: 'blue'
    },
    {
        dictValue: 'recruit_pause',
        dictName: '招聘暂停',
        color: 'orange'
    },
    {
        dictValue: 'recruit_waiting',
        dictName: '待开始',
        color: ''
    }
];
/**
 * 获取招聘进度状态色
 * @param {*} dictValue
 */
const findRecruitColor = dictValue => recruitColor.find(v => v.dictValue === dictValue) || { color: 'red' };

export { countryMap, findCountry, findRecruitColor };
